package com.vincent.common.utils;

import javax.servlet.http.HttpServletRequest;

/**
 * Request请求工具类
 */
public class RequestUtil {
    /**
     * 判断是否是ajax
     * @param req <code>HttpServletRequest</code>
     * @return isAjax==true
     */
    public static boolean isAjax(HttpServletRequest req){
        String header = req.getHeader("X-Requested-With");
       return  "XMLHttpRequest".equals(header) ? true:false;
    }
}
